home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / database / eb1.arj / PACKED.EB / MANUAL.REP < prev    next >
Text File  |  1994-02-01  |  110KB  |  2,522 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                             EASY BASE USERS MANUAL
  7.                             ══════════════════════
  8.  
  9.                                   Contents
  10.                                   ────────
  11.  
  12.  
  13.  
  14.  
  15.               System Overview..............................   1
  16.  
  17.               Data Management Principles...................   2
  18.  
  19.               Form Design..................................   6
  20.  
  21.               Relationships and Lookups....................  11
  22.  
  23.               Data Entry...................................  15
  24.  
  25.               Procedures (Reporting).......................  20
  26.  
  27.               Procedures (Transactional)...................  36
  28.  
  29.               User Menus...................................  39
  30.  
  31.               System Requirenents and Limitations..........  43
  32.  
  33.               DOS Filename Convention......................  44
  34. ................................................................................
  35.  
  36.  
  37.  
  38.  
  39.                                TERMINOLOGY
  40.                                ═══════════
  41.  
  42.      Field         The storage space for an individual data item.
  43.      ─────
  44.  
  45.      Record        A set of related data items.
  46.      ──────
  47.  
  48.      Form          The storage space for a set of records.
  49.      ────
  50.  
  51.      Procedure     A set of instructions which manipulate the data
  52.      ─────────     stored in forms.
  53.  
  54.      Relationship  A record in the relationships form recording
  55.      ────────────  a link between forms.
  56.  
  57. ................................................................................
  58.  
  59.                         EASY BASE SYSTEM OVERVIEW
  60.  
  61.        Easy Base is a complete rapid programming system for data
  62.        management. Virtually every data management problem can be
  63.        broken down into three areas. Creating disk files (referred to
  64.        as "Forms" in Easy Base) in which to store data, creating
  65.        procedures which manipulate that data and presenting those
  66.        forms and procedures in a logical menu system for use.
  67.  
  68.        In Easy Base you create the forms in which to store data in a
  69.        simple screen-painting environment which not only designs the
  70.        data file but at the same time provides a default data entry
  71.        screen for your data. As you place the "Fields" in which data
  72.        is to be stored you can use relational links ("Lookups") to
  73.        import data from other forms. Each field you create for data
  74.        storage is also treated as a deriveable "Cell" similar to a
  75.        spread sheet. You can make almost any calculation or derivation
  76.        within a field as, apart from all arithmetic, relational and
  77.        logical operators, Easy Base also provides a set of over fifty
  78.        functions covering everything from Modulo arithmetic to
  79.        spelling out dates. Once you have created your forms you can
  80.        use the default screen to enter and view your data using the
  81.        "Data Entry" system.
  82.  
  83.        Once you have data stored you will need to be able to
  84.        manipulate it and report on it. Easy Base provides a combined
  85.        transaction and reporting system ("Procedure Generator"). With
  86.        the procedure generator you can use the default screens you
  87.        have designed or create custom screens in which to gather input
  88.        either from the keyboard or from relational Lookups. You then
  89.        instruct Easy Base what to do with this information using a
  90.        simple "Basic" like programming language. If your procedure is
  91.        transactional you have commands to enter, modify or delete
  92.        records in any number of forms within a single procedure. If
  93.        your procedure is reporting then there are commands to group,
  94.        order and list data in almost every conceivable way.
  95.  
  96.        You now have all the "Parts" required to create a useful data
  97.        management program. All that remains is to tie your procedures
  98.        to a menu system so that other people can use your application
  99.        without having to know anything about Easy Base. Creating an
  100.        end user menu system in Easy base is as simple as filling in a
  101.        form with the text you wish to display and the procedure or
  102.        form you wish to run. You give at least one of your menus a
  103.        start up password. If you then restart Easy Base but sign on
  104.        with that password instead of your developers password then you
  105.        will be running your own custom designed program.
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.                                    - 1 -
  113. ................................................................................
  114.  
  115.                        DATA MANAGEMENT PRINCIPLES
  116.  
  117.        In Easy Base, creating forms and entering data is very easy.
  118.        You will be tempted to rush on and create programs for yourself
  119.        without reading the "Bumf". However, unless you are an
  120.        experienced data programmer, you should at least read this
  121.        section and the one on Relationships before embarking on any
  122.        serious project - it could save you a great deal of time!
  123.  
  124.        The crux of data management is "Data Integrity" or "Data
  125.        Verification".  You might know that "A Smith", "Smith's Garage"
  126.        and "Smith and Son" are all the same customer of yours but your
  127.        computer definitely does not! If you have a small business you
  128.        might wish to use Easy Base to create invoices - you might be
  129.        tempted to start by creating an invoice form in which you enter
  130.        your customers name, work done and price. - DON'T - Start
  131.        instead by creating a form to hold each of your customers'
  132.        names, addresses, credit limit etc.  If you sell things then
  133.        create a form to hold each of your stock items with their name,
  134.        partno, price etc.  These are your "Core" data forms from
  135.        which you "Lookup" data for other purposes. Each of your "Core"
  136.        data forms has a "Unique" field which defines the record as an
  137.        entity. "Smith's Garage" will always be "Smith's Garage" and
  138.        the lookup function described later will not allow any other
  139.        representation to be entered.
  140.  
  141.        Although of less significance than "Data Integrity", the names
  142.        which you give to forms and fields are very important and worth
  143.        mentioning now. When you come to write "Lookup" derivations and
  144.        later, Procedural code you have to refer to your data by a
  145.        combination of its form and field names. Please give
  146.        considerable thought to the names you use. Each name should be
  147.        short but fully describe the form or field. The names of forms
  148.        should be plural and the names of fields singular. For example
  149.        - a form which is to hold details of your customers should be
  150.        called "Customers", the name field should be called "Name" and
  151.        the credit limit field should be called "Creditlimit" . When
  152.        you need to lookup data from this form the lookup function will
  153.        be written - Lookup(customers,name) and when you write
  154.        procedures the data will be referred to as customers.name ,
  155.        customers.creditlimit etc.  If you did not follow this naming
  156.        convention and called the form "F1" , the name field "customer"
  157.        and the credit limit field "Max cred" then writing procedure
  158.        code would be extremely frustrating.
  159.  
  160.        It is equally important to give the same name to fields which
  161.        hold the same data in different forms. If you already had a
  162.        form called "Employees" which had fields "Worksno", "Name",
  163.        "Address" and "Taxcode" and you then created a "Payslips" form
  164.        the fields which hold the employee's name and taxcode should
  165.        also be called "Name" and "Taxcode". This not only makes it
  166.        easier to remember field names but when you come to write
  167.  
  168.                                    - 2 -
  169. ................................................................................
  170.  
  171.        procedure code, data can be transferred between one form and
  172.        another with the command "Copy all from". This command only
  173.        transfers data between fields with the same name. If you have
  174.        given different names to the fields in the two forms you will
  175.        have to transfer each individual field separately.
  176.  
  177.        The fields which you create are of four general types - The
  178.        definition (unique) field, grouping fields, ordering fields and
  179.        descriptive fields.
  180.  
  181.        When you create your "Core" data forms it will be fairly
  182.        obvious which is the definition field. In the "Employees" form
  183.        "Worksno" defines the record. In a "Manufacturers" form "Name"
  184.        defines the record. As a general rule, each form should have a
  185.        definition field. There is an exception to this where a form is
  186.        used to store temopary lists (described later) but for the
  187.        moment you should expect to have a definition or "Unique" field
  188.        on each form to prevent duplicate entries. When you create
  189.        secondary forms which lookup data from your "Core" forms the
  190.        data which defines the record as an entity will not necessarily
  191.        be contained solely in one of the fields you wish to display.
  192.  
  193.        As an example - A magazine wholesaler has two "Core" forms, one
  194.        containing details of the magazines he supplies and one
  195.        containing customers details. He creates a form on which to
  196.        record orders from his customers. This "orders" form has three
  197.        fields, "Name"(for the customer), "Magazine" and "Quantity".
  198.        When a customer phones in an order for a particular magazine
  199.        the wholesaler will need to be warned if this particular
  200.        customer has already ordered this particular magazine but no
  201.        one field defines the record. In fact the record is defined as
  202.        unique by a combination of the two fields "Name" and "Magazine"
  203.        In this case, a fourth field should be added to the form in
  204.        which the two fields "Name" and "Magazine" are combined using
  205.        the "jointext" function. This field is then the "Unique" field
  206.        and no duplicate entries will be allowed.
  207.  
  208.        In many secondary forms the records definition will be even
  209.        less obvious but if you are to create data storage for flexible
  210.        reporting you should always attempt to create a suitable
  211.        "unique" field.
  212.  
  213.        For example :- An "Aircraft" form has a field "Manufacturer"
  214.        which is looked up from a "Manufacturers" form. It also has
  215.        fields for "Name" and "Mark". The definition of an aircraft is
  216.        what it is known as. If it has a name then it is known as a
  217.        combination of the manufacturer and the name (Supermarine
  218.        Spitfire) but if it does not have a name it is known as a
  219.        combination of the manufacturer and mark (English Electric P1b)
  220.        Even in these more complicated situations you can still create
  221.        a unique field to prevent duplicates. In the above example you
  222.        would create the unique field "Knownas" and derive it with the
  223.  
  224.                                    - 3 -
  225. ................................................................................
  226.  
  227.        formula - Jiontext(manufacturer,if(name = blank,mark,name))
  228.  
  229.        When you define a field as unique Easy Base automatically
  230.        indexes this field.
  231.  
  232.        The second type of field is a "Grouping" field. This is a field
  233.        which will be used in procedures to select subsets of records.
  234.        In the "Aircraft" form you might add a field "Type" which would
  235.        qualify each record as belonging to a group - "Fighter",
  236.        "Bomber", "Transport" etc. Grouping fields should also be
  237.        defined as indexed and should always be subject to data
  238.        integrity checking. Where the number of groups is small (17 or
  239.        less) Easy Base provides a quick method of data verification in
  240.        the "Choice" field type. If the number of groups is larger than
  241.        17 then you should create a "Core" form to hold the group names
  242.        and look them up into the secondary form.
  243.  
  244.        The third type of field is used for ordering data. In many
  245.        instances the order in which you wish to print or view data
  246.        will be that of the definition field or one of the grouping
  247.        fields but not always. In the "Aircraft" form you might wish to
  248.        list them by the dates they were first introduced or by the
  249.        total production runs. In order to do this you would have to
  250.        add fields for "Date" and "Production". You would later write
  251.        procedures to list the aircraft with "Date in order" or
  252.        "production in order". Ordering fields should also be indexed
  253.        but they need not necessarily be checked for data integrity.
  254.  
  255.        Fields which are not used for ordering or grouping are
  256.        descriptive and need not be indexed or integrity checked.
  257.  
  258.        One of the most common mistakes made by beginners to data
  259.        management is to create different forms for the same data.
  260.        With the "Aircraft" form above you might be tempted to save all
  261.        the military aircraft of World War 1. Later you might create a
  262.        second form for the aircraft of World War 2. This would be a
  263.        mistake. The data you are recording is "Aircraft". The era to
  264.        which they belong should simply be another "Grouping" field.
  265.        If having saved your data you were asked for a list of all
  266.        "Boeing" military aircraft showing which wars they were used in
  267.        then this could be achieved with one simple procedure if they
  268.        were in one form but would be rather more difficult if they
  269.        were in two.
  270.  
  271.        That example was fairly obvious but on many occasions it will
  272.        be easy to assume that two or more sets of data are separate
  273.        when in fact they are simply groups of the same.
  274.  
  275.        Should you decide to write your own accounting program (Which
  276.        is not as daunting a task as it might seem on the surface) You
  277.        might be tempted to create forms for a Sales Ledger, Nominal
  278.        Ledger and Customers Accounts. In fact the entries in the
  279.  
  280.                                    - 4 -
  281. ................................................................................
  282.  
  283.        Nominal Ledger and Customers Accounts are simply sub groups of
  284.        the entries in the Sales Ledger. Provided that you include
  285.        grouping fields for the customers account number and nominal
  286.        account name you can construct customers and nominal accounts
  287.        when required by extracting and totalling the sub sets. There
  288.        is no need to save them as separate data.
  289.  
  290.        The final problem you will encounter when deciding how to store
  291.        data is that of "Related Lists".  Consider the "Aircraft" form.
  292.        If you had a grouping for "Airliner" you might wish to record
  293.        all the airlines which operate each aircraft. You cannot just
  294.        add fields to the "Aircraft" form - One airliner might only be
  295.        operated by one airline and another might be operated by fifty.
  296.  
  297.        To store this data you need another form let's call it Userlist
  298.        with fields "Aircraft" , "Airline" and "Uni" which is the
  299.        unique field derived by joining the other two. The "Aircraft"
  300.        field is looked up from the "Aircraft" forms unique field
  301.        "Knownas" and the "Airline" field is looked up from the
  302.        "Airlines" form "Name" field which is also unique.
  303.  
  304.        In this form you enter one record for each combination of
  305.        aircraft and airline. When you come to report on your data you
  306.        can list single records from the main "Aircraft" form together
  307.        with all related records from the "Userlist" form.
  308.  
  309.        ...................PROCEDURE CODE.............
  310.        declare output fields
  311.           aircraft.knownas : Aircraft.production :aircraft.seats
  312.           userlist.airline
  313.        end
  314.        for aircraft with knownas = input.knownas
  315.           print formfields
  316.           for userlist with aircraft = aircraft.knownas
  317.              print userfields
  318.           next
  319.        next
  320.  
  321.        ...................FORMAT.....................
  322.  
  323.        .formfields
  324.                          { Aircraft.knownas field }
  325.  
  326.              Production { Prodn. field}    Seats  {Seats field }
  327.  
  328.                                Operated by :-
  329.  
  330.        .userfields
  331.                         { Userlist.Airline field  }
  332.        .end
  333.  
  334.  
  335.  
  336.                                    - 5 -
  337. ................................................................................
  338.  
  339.                                FORM DESIGN
  340.  
  341.        To start designing your forms select "Form Design" then "Design
  342.        new Form" from the menu system.  You are presented with a blank
  343.        form. Each form has four pages. To move from one page to the
  344.        next use the PgDn and PgUp keys. To move the cursor around on a
  345.        page use the arrow keys. Designing your form is a bit like
  346.        designing a form on paper. If you were to type on a paper form-
  347.  
  348.                 Name     .................
  349.                 Address  .................
  350.                          .................
  351.                          .................
  352.                          .................
  353.  
  354.        Then in Easy Base you type Name and Address as above but
  355.        instead of typing the dots you define fields for the data to be
  356.        entered to.
  357.  
  358.        Easy Base provides several facilities for "Polishing" the
  359.        presentation of your forms and these are covered first before
  360.        moving on to field definition.
  361.  
  362.        If you wish to enclose your text within boxes or in some
  363.        tabular format Press F3 and select "Line Drawing".  To draw
  364.        lines on the screen hold down the Alt key, The Ctrl key or both
  365.        and drive the cursor around with the arrow keys. The Alt key
  366.        draws double thin lines, the Ctrl key draws single thin lines
  367.        and a combination of both draws a thick single line. Press Esc
  368.        when you are finished line drawing to return to normal editing.
  369.  
  370.        If you wish to shade areas of the screen then again press F3
  371.        and select "Shading". Shading works much the same as Line
  372.        Drawing.
  373.  
  374.        If you require Greek, Mathematical or International characters
  375.        which cannot be typed directly from the keyboard then press F3
  376.        and select either "Greek and Mathematical" or "International" A
  377.        menu of all such characters provided by your PC will appear.
  378.        The one you select is printed to your form at the cursor
  379.        position.
  380.  
  381.        If you wish to use other than the default text colour then
  382.        press F4 after you have typed your text. In each Easy Base
  383.        screen colour set you can select one of two alternate text
  384.        colours or "Blink" - choose 1, 2 or 3 .  To change the colour
  385.        of your text or lines just hold down the shift key and drive
  386.        the cursor over the text you want to change with the arrow
  387.        keys. Press Esc when you have finished colouring your form.
  388.  
  389.        Text input in the form designer has "overtype" as the default.
  390.        If you wish to move text (or fields) to the right press the
  391.  
  392.                                    - 6 -
  393. ................................................................................
  394.  
  395.        Ins key. Insert mode is indicated by a block cursor and
  396.        Overtype by an underscore cursor. (This is the opposite to all
  397.        other editors in Easy Base as it keeps the underscore cursor as
  398.        the default)
  399.  
  400.        To insert a blank line above text or fields press F1. You
  401.        cannot scroll text or fields between pages in form design.
  402.  
  403.        If you need to move areas of your form then press F9, shade the
  404.        rectangle you wish to move and move it around with the arrow
  405.        keys. You can also transport the rectangle between pages with
  406.        the PgUp and PgDn keys.  F9 can also be used to erase areas of
  407.        the screen.
  408.  
  409.        When you are ready to define the data fields, position the
  410.        cursor where you want the field to start and press F10.
  411.        A window opens into which you enter all the attributes for the
  412.        field.
  413.  
  414.        The first attribute is "Field Name". If you have typed text to
  415.        the left of the field then Easy Base will have inserted this as
  416.        a default in the Field Name attribute. If it's not the name you
  417.        want just edit it. When you are happy with the field name press
  418.        return or the down arrow to the "Data Type" attribute. A menu
  419.        appears with the nine different field types. (The field types
  420.        are described fully in the Programmers Reference)
  421.  
  422.        When you have chosen a field type the cursor automatically
  423.        moves down to the "Field Length" attribute if you have chosen
  424.        "Text", "Integer", "Fixed Point" or "Floating Point" and to the
  425.        "Mandatory Entry" attribute if you have chosen one of the
  426.        others. Enter the field length you require in characters. If
  427.        you have chosen "Fixed Point" as the field type there are two
  428.        entries, one for the digits left of the decimal point and one
  429.        for the digits right of it. If your field is to hold a currency
  430.        value then the second entry will of course be 2.
  431.  
  432.        You must supply values for the first three field attributes.
  433.        The others all have preset defaults so you can save your field
  434.        at this point if none of the others have to be changed.
  435.  
  436.  
  437.        The next Field Attribute is "Mandatory Entry" which has a
  438.        default of "No".  You can set this to "Yes", "No" or "If". If
  439.        you set it to "Yes" then Easy Base will not allow a record to
  440.        be filed with this field left blank.  If you set it to "If"
  441.        then the "Code Snippet" editor opens up and you can enter the
  442.        condition under which an entry becomes mandatory. If you were
  443.        designing a "Payments" form and one of the fields "Paymethod"
  444.        could be filled with either "Cash" or "Cheque". Then the field
  445.        "ChequeNo" would have to be filled only if the "Paymethod"
  446.        field had "Cheque" entered in it.  To make an entry mandatory
  447.  
  448.                                    - 7 -
  449. ................................................................................
  450.  
  451.        in the "Chequeno" field only if "Paymethod" is "Cheque" enter -
  452.  
  453.        paymethod = "cheque" in the Code Snippet editor.
  454.  
  455.        When you use the Code Snippet editor for Mandatory Entry and
  456.        for User Entry, only the condition is entered :-
  457.  
  458.              total < 100
  459.              name = blank
  460.              length = blank or breadth = blank
  461.  
  462.        the "if" is assumed.
  463.  
  464.        If you set the "Mandatory Entry" attribute to either "Yes" or
  465.        "If", a window will open into which you can type the message
  466.        which you wish to be displayed should an attempt be made to
  467.        file a blank entry.  If you leave the message blank Easy Base
  468.        will supply the default message "This field must be filled !".
  469.  
  470.        The next attribute is "Unique". This can be set to "Yes" or
  471.        "no".  You can only have one unique field on a form. If you
  472.        have already defined a field as the unique field and you change
  473.        your mind and define another then Easy Base will automatically
  474.        cancel the unique attribute on the first field.  Indexing is
  475.        automatically set to "Yes" for the unique field.
  476.  
  477.        The next attribute is "Indexed". Select "Yes" or "No"
  478.        When you set "Index" to "yes",  Easy Base Creates a separate
  479.        "Index" file in which the contents of the field are kept in up
  480.        to date order. Index files are used by Easy Base in exactly the
  481.        same way that you would use an index in a book to find things
  482.        quickly.
  483.  
  484.        The next attribute is "User entry".  This has a default of
  485.        "Yes" but can be set to "No" or "If".  If you set this
  486.        attribute to "No" then the cursor will not visit the field
  487.        during record entry so the user cannot alter its contents. You
  488.        would normally set this to "No" if the contents are derived or
  489.        calculated from the values of other fields. You can set this
  490.        attribute to "If" if the value entered in another field makes
  491.        this one superfluous. For example, in the "Aircraft" form, if
  492.        you had a field "Passengers" and the type had been entered as
  493.        "Fighter" there would be no point in the cursor moving to the
  494.        "Passengers" field.  When the Code Snippet editor opens you
  495.        could type:-
  496.  
  497.              type = "Transport" or type = "Airliner"
  498.  
  499.        The next field attribute is "Display".   When the cursor
  500.        reaches this attribute a menu appears with the seven different
  501.        ways in which the field can be displayed.
  502.  
  503.  
  504.                                    - 8 -
  505. ................................................................................
  506.  
  507.        The field display attribute settings have the following
  508.        meaning.
  509.  
  510.        1.  FIELD
  511.  
  512.            The field's size is displayed as a block which shows
  513.            up against the screen background.
  514.  
  515.        2.  TEXT
  516.  
  517.            The field size does not show up against the screen
  518.            background and the contents are in the default text colour.
  519.  
  520.        3.  1ST ALT COL.
  521.  
  522.            As Text but with the contents in the first alternate colour
  523.  
  524.        4.  2ND ALT COL
  525.  
  526.            As Text but with contents in the second alternate colour.
  527.  
  528.        5.  BLINKING
  529.  
  530.            As Text but the contents blink.
  531.  
  532.        6.  INVISIBLE
  533.  
  534.            Neither the size nor the contents can be seen.
  535.            Invisible fields are used to hold compound index fields and
  536.            the results of intermediate calculations which the user
  537.            need not see.
  538.  
  539.        7.  CODEWORD FIELD
  540.  
  541.            The size of a codeword field shows against the screen
  542.            background but its contents are masked by stars.
  543.            Codeword fields are used to collect passwords for
  544.            restricted menus or procedures. An onlooker cannot see the
  545.            password which is being entered.
  546.  
  547.        The final field attribute is "Derived". If you set this to
  548.        "yes" then the Code Snippet editor opens and you can enter the
  549.        formula by which the fields contents are to be derived.
  550.  
  551.        In the Code Snippet editor you can enter almost any derivation
  552.        formula. Formulae consist of field names operators and
  553.        functions.
  554.  
  555.           price * markup
  556.           VATon(net,vatrate)
  557.           datetext(system date)
  558.           if(sex = male,"Mr","Ms")
  559.  
  560.                                    - 9 -
  561. ................................................................................
  562.  
  563.        All the operators and functions are fully described with
  564.        examples of how they are used in the Programmers Reference.
  565.  
  566.        If in the Code Snippet editor you cannot remember a field or
  567.        function name then Press F1 for the reminder lists.
  568.  
  569.        There is a cut and paste facility in the Code Snippet editor.
  570.        To mark text hold down the shift key and move the cursor with
  571.        the arrow keys. When you release the keys the "Cut" or "Copy"
  572.        choice will appear. To paste text, position the cursor at the
  573.        insertion point and press Shift + Ins.  Text which is cut or
  574.        copied from the derivation of one field can be pasted into the
  575.        derivation of any other field in any other form.
  576.  
  577.        When you have finished entering the field attributes press F2
  578.        to save the field. When you have defined all the fields press
  579.        F2 to save the form.
  580.  
  581.        There is one other facility in the Form Design editor.  If you
  582.        press F5 at any time you enter "Derivation Test Mode".  In
  583.        derivation test mode you can enter data to your fields and
  584.        check if your derivations work correctly.  Any fields which you
  585.        have defined as invisible are not hidden in test mode.  The
  586.        main advantage of test mode as opposed to testing in Record
  587.        Entry comes not when you are designing new forms but when you
  588.        wish to modify one after you have saved many records in it.  If
  589.        you add, delete or alter the length of a field then the entire
  590.        data file has to be reformatted and this takes time.  With
  591.        "Derivation Test Mode" you can ensure that the modifications
  592.        you have made are correct before reformatting.
  593.  
  594.        The only exception to test mode is if you have added a new
  595.        lookup function and you have not yet entered the relationship.
  596.        If you select test mode with a relationship missing you will
  597.        get an error message and be returned to Form Design.
  598.  
  599.        When you save your form Easy Base tests it in derivation test
  600.        mode before saving. If it cannot find a relationship you will
  601.        be given an error message and offered the choice to remain in
  602.        Form Design (which you would do should you know that the
  603.        relationship exists and you must therefore have mistyped a
  604.        lookup formula) or to save and exit anyway. (Which you would do
  605.        if the relationship had not yet been entered)
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.                                    - 10 -
  617. ................................................................................
  618.  
  619.                    RELATIONSHIPS AND THE LOOKUP FUNCTION
  620.  
  621.        In Easy Base the Lookup Function together with pre-recorded
  622.        relationship links provide two of the most important facilities
  623.        of a data management system.
  624.  
  625.            1. Reuse of previously entered data.
  626.            2. Verification of text data.
  627.  
  628.        Consider the situation where you have designed a form to hold
  629.        information about your business's customers. The form has an
  630.        "accountno" field which has been derived as "Sequence" and this
  631.        is therefore the "Unique" field on the form.  It also has
  632.        fields "Name" and "Address".  All your customers have now been
  633.        recorded in this form.  You now want to create an invoice form.
  634.        Each invoice issued will have to have a customer's name and
  635.        address entered on it.  All the names and addresses are already
  636.        filed in Easy Base so they do not have to by typed again.
  637.        Provided that Easy Base knows which customer's name and
  638.        address is required it can copy it automatically from the
  639.        "Customers" form to the "Invoice" form.
  640.  
  641.        The way in which Easy Base accomplishes this is exactly the
  642.        same as you would accomplish the task manually in a hand
  643.        written system. If you knew where to find the book in which
  644.        your customers names had been written and you knew the
  645.        customers account number then you could find the customers name
  646.        and address.
  647.  
  648.        The only slight difference for the computer is that while you
  649.        would consider it "Obvious" that the account number on the
  650.        invoice would be the same as the account number in the
  651.        addresses book your computer does not - You have to tell it.
  652.  
  653.        To tell Easy Base where to look and that the "accountno" is the
  654.        link, you enter a record in the "Relationships" form.
  655.  
  656.        When you select "Relationships" from the main menu you will see
  657.        five fields to be filled.  The first field is the name of the
  658.        form which data is to be copied to. In this case you will enter
  659.        "Invoices".  You will notice that easy base has displayed a
  660.        list of all your form names and that you must choose one.  You
  661.        cannot enter the name freehand.  This "internal" data
  662.        verification is the same as you will be doing for your own data
  663.        later.
  664.  
  665.        The second field is for the name of the form in which the data
  666.        can be found.  In this case select "Customers".
  667.  
  668.        The next two fields record which fields in the primary and
  669.        secondary form hold the "Linking" data. In this case select
  670.        "acountno" in both.
  671.  
  672.                                    - 11 -
  673. ................................................................................
  674.  
  675.        The final field is the name of the relationship record.  You
  676.        will notice that Easy Base has already entered a default name
  677.        of "Customers".  The relationship name can be anything you like
  678.        but as the "Lookup" function which you are about to use quotes
  679.        the relationship name as its first parameter and the field to
  680.        be copied as its second then Lookup(customers,name) has to be
  681.        more meaningful and easy to remember than any other name you
  682.        could give.
  683.  
  684.        When you have entered all the fields press F2 to save the
  685.        relationship, return to Form Design and load your "Invoice"
  686.        form.
  687.  
  688.        All that remains to do now is edit the field attributes of the
  689.        "Name" and "address" fields.  To edit a field you can either
  690.        press F10 with the cursor on the form background and select the
  691.        field to edit by name, or you can position the cursor within
  692.        the field you wish to edit and then press F10, in which case
  693.        the field attribute window will open automatically.  Position
  694.        the cursor in the "Name" field and press F10. Move the cursor
  695.        to the "Derivation" attribute and set it to yes. (you can move
  696.        the cursor from the "Name" attribute directly to the "Derived
  697.        attribute by pressing the up arrow)
  698.  
  699.        When the Code Snippet window opens type -
  700.  
  701.             Lookup(customers,name)
  702.  
  703.        and press F2.  If you had not already done so then set the
  704.        "User Entry" attribute to "No".
  705.  
  706.        Press F2 to save the new field attributes and then do the same
  707.        for the "Address" field, this time entering the derivation -
  708.  
  709.            Lookup(customers,address)
  710.  
  711.        To test that you have typed the lookups correctly press F5 for
  712.        Derivation Test Mode. Enter a customers account number in the
  713.        "Acountno" field and press the return key. If your formulae are
  714.        correct the customers name and address will appear in the
  715.        "Name" and "Address" fields.
  716.  
  717.        In this example you have performed two "Secondary" lookups.
  718.        Both the "Name" and "Address" fields were found using the
  719.        "accountno" link which you had to enter correctly in order
  720.        to find the other two fields.
  721.  
  722.        The real power of the Lookup function is only realized when you
  723.        perform "Primary" and "Secondary" lookups.  In a "Primary"
  724.        lookup the field whose value is to be looked up is also the
  725.        "Link".  It is "Primary" lookups which are used for data
  726.        integrity checking.
  727.  
  728.                                    - 12 -
  729. ................................................................................
  730.  
  731.        Consider the "Aircraft" and "Manufacturers" forms which were
  732.        discussed earlier.  Suppose that you want to lookup the
  733.        manufactures name and the name of his base airfield into the
  734.        "Aircraft" form.  The definition field in the "Manufacturers"
  735.        form is "Name" - There is no handy "accountno".  You are going
  736.        to have to enter a relationship between "Aircraft" and
  737.        "Manufacturers" linking the two fields "Manufacturer" in the
  738.        "Aircraft" form with "Name" in the "Manufacturers" form.
  739.  
  740.        Having done this you could derive the "Base" field in the
  741.        "Aircraft" form with - Lookup(manufacturers,base) - and it
  742.        would be looked up when you entered the manufacturers Name just
  743.        as in the invoice example.  But what of the "Manufacturers"
  744.        field itself.  Was the name you entered in the manufacturers
  745.        form "A.V.Roe", "A.V.Roe & Co." or "AVRO A/C Co.".
  746.  
  747.        Easy Base provides a simple solution to this problem.
  748.  
  749.        Having entered the relationship, return to Form design and
  750.        enter the lookup derivations. Derive the "Base" field with -
  751.  
  752.            Lookup(manufacturers,base)
  753.  
  754.        and the "Manufacturers" field with
  755.  
  756.            Lookup(manufacturers,name)
  757.  
  758.        This time, leave the "User Entry" attribute set to "Yes" in the
  759.        "Manufacturers" field.
  760.  
  761.        Press F5 for "Test mode".  When the cursor enters the
  762.        "Manufacturers" field type -  AV*  - and press return.
  763.  
  764.        Provided there is only one manufacturer whose name begins with
  765.        "AV" the Avro name will be looked up into the "Manufacturers"
  766.        field and its representation will always be exactly the same as
  767.        the original entry in the "Manufacturers" form.  If there are
  768.        several manufacturers whose names begin with "AV" then a menu
  769.        will appear listing all of them and you can choose the one you
  770.        want. As soon as you select the name the secondary lookup
  771.        "Base" will fill automatically.
  772.  
  773.        If you cannot remember the first letters of the name you want
  774.        to look up - say for example that you could only remember that
  775.        "Roe" was in the name - then type Roe* and press return.  If
  776.        any manufacturers names begin with "Roe" they will be displayed
  777.        first. If not Easy Base will fill the "Manufacturer" field with
  778.        the first name it finds with the letters roe in it.  If this is
  779.        not the one you want press F3.  Each time you press F3 Easy
  780.        Base will find the next name containing the letters until you
  781.        find the one you want.   As a final resort - if you really
  782.        can't remember what you are looking for - just enter an "*" on
  783.  
  784.                                    - 13 -
  785. ................................................................................
  786.  
  787.        its own and press return. Easy Base will then list all the
  788.        manufacturers names for you to choose from.
  789.  
  790.        There is no limit to the number of secondary lookups which can
  791.        be made from each primary and there is no limit to the number
  792.        of different forms you can look data up from.
  793.  
  794.        If you have many different forms which all look up data from
  795.        the "Customers" form then they can all use the same
  796.        relationship name "Customers" but if you have more than one
  797.        relationship between the same two forms then they must have
  798.        different names.
  799.  
  800.        If you had a "Stock" form with the unique field "Item" and
  801.        another field "Price" then you could add four fields to your
  802.        "Invoice" form - "Item", "Quantity" "Price" and "Total".
  803.  
  804.        You would enter a relationship "Stock" between "Invoice" and
  805.        "Stock" with the related fields being "Item" in both forms.
  806.  
  807.        In your invoice form you would derive :-
  808.  
  809.           Item as    Lookup(stock,item)
  810.           Price as   Lookup(stock,price)
  811.           Total as   quantity * price
  812.  
  813.        When you entered the "Item" field (primary lookup) the price
  814.        field would fill automatically and when you entered the
  815.        "Quantity" the "Total" field would be calculated.
  816.  
  817.        However, if you now add four more fields "Item2", "Price2",
  818.        "Quantity2" and "Total2" you will need another relationship
  819.        between "Invoice" and "Stock" this time linking "Item2" in the
  820.        "Invoice file" with "Item" in the stock file and you cannot now
  821.        use the default name "Stock" for the relationship.
  822.  
  823.        Although you can give your additional relationship any name you
  824.        like, the best name will be "Stock2".
  825.  
  826.        Please note that this example is used purely to show the use of
  827.        multiple relationships between the same two forms.  If you are
  828.        intending to write an invoicing system then unless you know
  829.        that there will only be a limited number of items on each
  830.        invoice this is not a practical way to tackle the problem.
  831.  
  832.        In a flexible invoicing system each item and quantity is
  833.        entered via a procedure to a temporary list form whose contents
  834.        are then printed to the invoice.
  835.  
  836.  
  837.  
  838.  
  839.  
  840.                                    - 14 -
  841. ................................................................................
  842.  
  843.                                  DATA ENTRY
  844.  
  845.        As soon as you have designed forms you can enter and view data
  846.        directly using the default screen you created.  To enter data
  847.        to a form select "Data Entry" from the main menu and choose the
  848.        form you wish to use.
  849.  
  850.        Your default entry screen will appear with the cursor in the
  851.        top left field. The top line of the screen shows the name and
  852.        page number of the form you are using together with the system
  853.        date and time. Line 2 shows the number of the record you are
  854.        creating or editing on the left hand side. It is also the line
  855.        on which any error messages are passed. The bottom line lists
  856.        the most used function keys and is also the line on which help
  857.        prompts are displayed.
  858.  
  859.        To move the cursor around between fields you can use all of the
  860.        cursor control keys which work as follows:-
  861.  
  862.        The Return key moves from field to field in the order top left
  863.        to bottom right unless you have overridden this in form design
  864.        by deriving fields with "Goto (fieldname) Next".
  865.  
  866.        The Tab key moves the cursor from field to field in the order
  867.        bottom right to top left (reverse of Return).
  868.  
  869.        The arrow keys move the cursor in the direction indicated.
  870.  
  871.        The Home Key moves the cursor to the beginning of the current
  872.        field if it is not already there and to the first field on the
  873.        page if it is.
  874.  
  875.        The End Key moves the cursor to the end of text if it is in a
  876.        text field and to the last field on the page if it is not.
  877.  
  878.        The PgUp and PgDn Keys move between pages if your form has more
  879.        than one.
  880.  
  881.        When you have entered the data for your first record press F2
  882.        to save it to disk. The screen will clear, the message "Record
  883.        1 has been added" will appear briefly on line two and you will
  884.        be ready to enter the next record.
  885.  
  886.        If some of your fields are primary lookups then you use them
  887.        exactly the same as was described for "Derivation Test Mode" by
  888.        entering part of the text followed by a star and pressing the
  889.        Return Key.
  890.  
  891.        Once you have saved a few records to disk you may wish to view
  892.        or edit them. You can bring previously entered records back to
  893.        the screen for editing in several ways.  From record creation
  894.        the F5 Key brings up the first record and subsequent presses
  895.  
  896.                                    - 15 -
  897. ................................................................................
  898.  
  899.        bring up the next record. Similarly, from record creation the
  900.        F4 Key brings up the last record and subsequent presses bring
  901.        up the previous record.
  902.  
  903.        Once you have entered several records this process becomes
  904.        impracticable and you "search" for the record you wish to view
  905.        or edit.  Position the cursor in any field and type part of the
  906.        field contents you wish to search for followed by a star and
  907.        press F3.
  908.  
  909.        Searching for records within a form is a similar process to
  910.        looking up data except that you press the F3 rather than the
  911.        Return Key to initiate the process. If the field in which you
  912.        are searching is indexed and more than one record matches the
  913.        data you have entered then Easy Base will make a list of all
  914.        the field contents which match for you to choose from.  If the
  915.        field is not indexed then Easy Base will bring up the first
  916.        record it finds a match in. If this is not the record you want
  917.        then press F3 again. Easy Base will find another match on each
  918.        successive press of the F3 key until you find the record you
  919.        want. As with lookups, Easy Base will search for "Part Matches"
  920.        after it has exhausted all the records where the entered data
  921.        matches the beginning of the field and if you enter a star on
  922.        its own and press F3, Easy Base will list all the field
  923.        contents for you to choose from.
  924.  
  925.        When you have brought a previously entered record back to the
  926.        screen you will notice that line 2 now displays "Editing Record
  927.        x of y " rather than "Creating New Record x ".  Easy Base
  928.        automatically changes from "Create" to "Edit" mode when you
  929.        view a record.  The changes which you make on screen are not
  930.        entered to the record on disk until you press F2.
  931.  
  932.        To clear the contents of the field in which the cursor lies
  933.        rather than delete each character press F6. To return to
  934.        "Create" mode press F6 twice.
  935.  
  936.        Not all of the active function keys are listed on the prompt
  937.        line. To see a full menu of the function key uses press F1 for
  938.        the Function Key Menu.  The following is a summary of the
  939.        function key usage in Data Entry:-
  940.  
  941.        F1
  942.  
  943.        The F1 Key brings up the function key Menu.
  944.  
  945.        F2
  946.  
  947.        The F2 Key writes a new record from "Create" and updates the
  948.        record on screen from "Edit" mode.
  949.  
  950.  
  951.  
  952.                                    - 16 -
  953. ................................................................................
  954.  
  955.        F3
  956.  
  957.        The F3 key initiates searches for previously entered records
  958.        based on the data entered in the current field.
  959.  
  960.        F4
  961.  
  962.        The F4 key moves to the previous record when in "Edit" mode and
  963.        to the last record from "Create" mode.
  964.  
  965.        F5
  966.  
  967.        The F5 Key Moves to the next record when in "Edit" mode and to
  968.        the first record from "Create" mode.
  969.  
  970.        F6
  971.  
  972.        The F6 key clears the current field on the first press and
  973.        returns you to "Create" mode on the second press.
  974.  
  975.        F7
  976.  
  977.        The F7 key deletes the record currently on screen in "Edit"
  978.        mode.  When you delete a record with the F7 key it is not
  979.        actually erased from the disk. It is simply "Flagged" for
  980.        deletion at the next "Pack" operation. If you delete a record
  981.        accidentally you can reinstate it any time before the form is
  982.        next packed.
  983.  
  984.        F8
  985.  
  986.        The F8 key creates a new record by copying the record currently
  987.        on screen. If a new record you wish to create contains similar
  988.        data to one already entered then you can find the previous
  989.        entry, change the unique field and copy it with F8 rather than
  990.        type it all again.
  991.  
  992.        F9
  993.  
  994.        If you know the number of the record you wish to view or edit
  995.        you can press F9 and enter the record number. Easy Base will
  996.        then bring the record whose number you have entered to the
  997.        screen.
  998.  
  999.        F10
  1000.  
  1001.        When you press the F10 key Easy Base searches for records which
  1002.        are "Flagged" for deletion.  When it finds one it will bring it
  1003.        to the screen. You can reinstate a deleted record by pressing
  1004.        F2 while it is on screen. The F5 key searches for the next
  1005.        deleted record and the Escape key returns you to "Live
  1006.        Records".
  1007.  
  1008.                                    - 17 -
  1009. ................................................................................
  1010.  
  1011.        F11
  1012.  
  1013.        If you have been viewing records and you wish to return to one
  1014.        which you had on screen earlier then press F11 and Easy Base
  1015.        will back step through the records you have viewed.
  1016.  
  1017.        F12
  1018.  
  1019.        The F12 key brings up the form's "Options". There are four
  1020.        options in Data Entry.
  1021.  
  1022.           1. Clear screen on Adding Record.             (Default Yes)
  1023.           2. Confirmation Required to delete Records.   (Default Yes)
  1024.           3. Confirmation Required to abandon Edits     (Default No)
  1025.           4. Clear Field on Editing                     (Default No)
  1026.  
  1027.        If you change "Clear Screen on adding Record" to "No" then,
  1028.        when you press F2 to file a new record, the data which is
  1029.        written to disk remains on screen ready for the next new
  1030.        record. This is useful if you are entering several records and
  1031.        many of the fields in each record contain the same data. You
  1032.        only have to overwrite the fields which are different each
  1033.        time.
  1034.  
  1035.        If you have many records to delete then set option 2 to "No"
  1036.        and you will be able to delete them without having to confirm
  1037.        each one.
  1038.  
  1039.        If you set option 3 to "Yes" then Easy Base will ask you to
  1040.        confirm that you wish to leave a record which you have edited
  1041.        but not updated to disk.
  1042.  
  1043.        If you set option 4 to "Yes" then Easy Base will clear the
  1044.        old contents of any field you start to edit.  This is most
  1045.        useful when used in conjunction with option 1. You can file a
  1046.        record, retain the contents for the next record and when you
  1047.        edit the fields which are different you do not have to first
  1048.        delete the data in them.
  1049.  
  1050.        The options you set for any given form remain with it until
  1051.        changed. They do not revert to the defaults when your computer
  1052.        is turned off and each form can have different option settings.
  1053.  
  1054.        Ctrl + E
  1055.  
  1056.        If you press the "E" key while holding down the Ctrl key you
  1057.        will get the extended "Greek" and "International" characters
  1058.        menu which was discussed in form design.
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.                                    - 18 -
  1065. ................................................................................
  1066.  
  1067.        Ctrl + S
  1068.  
  1069.        If you press The "S" key while holding down the Ctrl key you
  1070.        start the Spell-checker.  The Spell-checker will check the
  1071.        current field. If it finds a word not included in the Easy base
  1072.        dictionary it will offer you the choices to leave the word and
  1073.        continue, add the word to the dictionary, or choose one of the
  1074.        suggestions for replacement.
  1075.  
  1076.        The Spell checker does not automatically move from field to
  1077.        field but once you have started it, it remains active and will
  1078.        immediately check the next text field you move the cursor to.
  1079.  
  1080.        The Spell-checker is cancelled if you press the Escape key or
  1081.        if you press the F2 key to update the record.
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.                                    - 19 -
  1121. ................................................................................
  1122.  
  1123.                           PROCEDURES (REPORTING)
  1124.  
  1125.        The Easy Base procedure generator is the means by which you
  1126.        manipulate and report on your data.
  1127.  
  1128.        Each procedure has at least one part, the procedure code.  The
  1129.        procedure code contains the instructions you write to tell Easy
  1130.        Base what you want done.
  1131.  
  1132.        If your procedure has an "output", in other words your
  1133.        instructions tell Easy Base to send data to the screen or to
  1134.        the printer, then the procedure must also have an Output
  1135.        Format. The Output Format is where you show Easy Base how you
  1136.        want the data you are about to "output" arranged on the screen
  1137.        or page.
  1138.  
  1139.        If what your procedure is to do depends on variables, ie it
  1140.        requires information from the operator or from Looked up data
  1141.        from one or more of your forms then it also requires an "Input
  1142.        Screen".  The Input Screen is where you gather the variable
  1143.        information that your procedure needs in order to carry out its
  1144.        task.
  1145.  
  1146.        Select "procedures" from the main menu and have a look at the
  1147.        items on the procedures menu.
  1148.  
  1149.        You will notice that the menu has pre-selected item 2 "Load
  1150.        Existing Procedure". Other than your first procedure this is
  1151.        the most useful starting point.  Item 1, "Create New Procedure"
  1152.        is only required if you wish to start a new procedure after you
  1153.        have another one loaded. The three parts to a procedure
  1154.        mentioned above are created and edited at items 3,4 and 5.
  1155.  
  1156.        Procedures, like forms, are saved to disk and can be re-used
  1157.        repeatedly. Item 6 runs the current procedure and item 7 saves
  1158.        it to disk.
  1159.  
  1160.        Item 8 deletes procedures which are no longer required and Item
  1161.        9 copies an existing procedure. Often you will require a
  1162.        procedure which is similar to one you have already created. It
  1163.        is much quicker to copy the first procedure and then edit it
  1164.        than to start a new procedure from scratch.
  1165.  
  1166.        Item 10 recalls the last output from a procedure to the screen.
  1167.        If you need to see the output from a procedure but it is not
  1168.        imperative that you have the most up to date information,
  1169.        (close of business / month end figures Etc) then it is much
  1170.        quicker to view the last output than to re-run the procedure.
  1171.  
  1172.        Finally, a small window just below the menu shows the name of
  1173.        the currently loaded procedure. In this case it is "Untitled".
  1174.  
  1175.  
  1176.                                    - 20 -
  1177. ................................................................................
  1178.  
  1179.        If you have not already done so, read the descriptions of the
  1180.        Declare, For..Next, If..Then, Print and Printer Control
  1181.        commands in the Programmers Reference now. These are the basis
  1182.        of all "reporting" procedures and should be thoroughly
  1183.        understood. If you are a programming beginner then some of the
  1184.        examples in the For..Next section may seem a bit advanced -
  1185.        Just ignore them - for the moment it is only important that you
  1186.        understand the principle of the loop and the qualifications
  1187.        that can be applied to it.
  1188.  
  1189.        Now select item 4 to write your first Procedure Code.
  1190.        The next few pages will describe simple reporting procedures
  1191.        based on the "Aircraft" form. To write like procedures for the
  1192.        forms you have designed all you have to do is substitute your
  1193.        form and field names.
  1194.  
  1195.        Before you start, have a look at the function key list on the
  1196.        bottom line. F2 saves your code and checks it. If you press the
  1197.        Escape key your code is still saved but the checking routine is
  1198.        bypassed. If you have written code and find that it is not
  1199.        passed on F2 because, for example, one of your form fields
  1200.        needs to be indexed, then you can still save the code you have
  1201.        written while you modify the form.
  1202.  
  1203.        F3 and F4 provide search and replace facilities similar to a
  1204.        word processor.
  1205.  
  1206.        There is a cut and paste system.  To mark code for cutting or
  1207.        copying hold down the Shift key and shade the code with the
  1208.        arrow keys.  As soon as you release the keys a menu will pop up
  1209.        with three options - Cut, Copy or Indent. The cut and copy
  1210.        options work exactly the same as in the Code Snippet editor
  1211.        with Shift + Ins used to paste the text. If you select "Indent"
  1212.        then you can indent all the selected lines at once with the
  1213.        left and right arrow keys.
  1214.  
  1215.        If you want to print out your code then press F10.
  1216.  
  1217.        The F1 key, labelled "Help" is the key you use when you can't
  1218.        remember something.  It has all the names of your forms, the
  1219.        names of the fields in each form and the names of all Commands,
  1220.        functions, and System values.  If Easy Base recognizes the
  1221.        context of your procedure when you press F1 then it will list
  1222.        the names you need (Formnames, fieldnames or Commands). If not
  1223.        a menu will appear from which you can pick which you need.
  1224.  
  1225.        With the cursor at the start of the top line on your blank
  1226.        procedure screen press F1.
  1227.  
  1228.        The "Commands" reminder list appears on the right hand side of
  1229.        the screen.  The command you want is the first one , "Declare
  1230.        Output Fields" but before selecting it have a look at how to
  1231.  
  1232.                                    - 21 -
  1233. ................................................................................
  1234.  
  1235.        select from the reminder lists. There are over fifty commands
  1236.        on this list but only the first seventeen are shown. You can
  1237.        scroll though them with the arrow keys but you can also use the
  1238.        inbuilt alphabetic search facility. If you type "o" then the
  1239.        highlight bar will move directly to the "Odd Page Print"
  1240.        command.
  1241.  
  1242.        Take the highlight bar back to the "Declare Output Fields"
  1243.        command either by scrolling or by pressing the Home key and
  1244.        press return.  The command will be inserted on the first line,
  1245.        the cursor will move to the second line and the "Forms"
  1246.        reminder list will appear.  Select the form which you wish to
  1247.        report on. In my example case this will be "Aircraft".
  1248.        "Aircraft." is inserted on the second line and the "fields"
  1249.        reminder list appears. I select "Knownas".  I also wish to list
  1250.        the aircraft's mark and type so I write.
  1251.  
  1252.        Declare output fields
  1253.           Aircraft.knownas : Aircraft.mark : Aircraft.type
  1254.        end
  1255.  
  1256.        Declare the fields you wish to list either by typing them
  1257.        freehand or by pressing F1 for reminders.
  1258.  
  1259.        Now complete your procedure code:-
  1260.  
  1261.        Declare Output fields
  1262.           Aircraft.knownas : Aircraft.mark : Aircraft.type
  1263.        end
  1264.        for Aircraft
  1265.           Print list items
  1266.        next
  1267.  
  1268.        and press F2 to check and save the code.
  1269.  
  1270.        If you have typed everything correctly you will be returned to
  1271.        the Procedures menu.  If you have misspelled something then the
  1272.        line with the error will be highlighted and you will get an
  1273.        error message. Correct the error and press F2 again.
  1274.  
  1275.        Easy Base now knows that it is to list the three fields
  1276.        Knownas, Mark and Type from all the records in the "Aircraft"
  1277.        form.  It does not know how they are to be arranged or whether
  1278.        they are to be printed or just shown on screen. This
  1279.        information must now be recorded on the procedures "Output
  1280.        Format".
  1281.  
  1282.        Select item 5, "Output Format", from the procedures menu and
  1283.        have a look at the screen. As usual the bottom line shows the
  1284.        function key usage. To insert a blank line you use F1 as in
  1285.        form design. F2 saves the format and the Escape Key abandons
  1286.        it. F3 gives you a line drawing facility similar to that in
  1287.  
  1288.                                    - 22 -
  1289. ................................................................................
  1290.  
  1291.        form design and Ctrl + "E" brings up the Greek and
  1292.        International characters menu.  The F10 Key is used to place
  1293.        your output fields.
  1294.  
  1295.        The upper status line shows the paper size you have selected at
  1296.        the left hand edge. If you scroll to the right it also shows
  1297.        where the right hand edge of your paper will be at the three
  1298.        different print sizes 10, 12, and 17 characters per inch.
  1299.  
  1300.        On the right hand side of the screen a small menu will have
  1301.        appeared offering you a choice of Format Section names. You do
  1302.        not have to use one of these they are just to save you time.
  1303.        For the moment select "List Items" from this menu.
  1304.  
  1305.        .List items  will appear on the first line and the cursor will
  1306.        move to the second.  For a first procedure we will simply list
  1307.        the fields required in columns. To do this move the cursor in
  1308.        along the second line to leave a reasonable margin and press
  1309.        F10 to place the first field.  A menu appears listing the three
  1310.        fields which were declared in the procedure's code. I select
  1311.        "Aircraft.knownas".  As soon as The field has been selected a
  1312.        window opens showing the default type and length of the field.
  1313.        You can change these defaults if you wish the printed length or
  1314.        type(for numeric fields) to be different in the report to what
  1315.        it is in the form. This window also presents an extra attribute
  1316.        marked "Trim Trailing Spaces" which defaults to "No". If you
  1317.        set this to "Yes" then any blanks at the beginning or end of
  1318.        the fields contents will not be printed at run time. This
  1319.        facility is used mainly for inserting numbers or names into
  1320.        form letter text.
  1321.  
  1322.        Press F2 to accept the defaults. The area which the field will
  1323.        occupy is shown on screen. Now move the cursor to the right and
  1324.        place the other two fields. Finally, press the return key to
  1325.        take the cursor to a new line and type a full stop ".".  The
  1326.        section names menu appears again.  This time select "End".
  1327.  
  1328.        The format screen now looks like this.
  1329.  
  1330.        .List Items
  1331.             ██████████████    ████████████   ████████████
  1332.        .End
  1333.  
  1334.        Press F2 to save the format. When you do, a new menu will pop
  1335.        up with four choices for the output destination. The exact
  1336.        meanings of these selections will be discussed shortly.  For
  1337.        the moment select "Output to Screen". When the Procedures menu
  1338.        appears select item 7 and save your procedure to disk.
  1339.  
  1340.        Now select item 6 and run the procedure.
  1341.  
  1342.        The fields from each record of the "Aircraft" form are listed
  1343.  
  1344.                                    - 23 -
  1345. ................................................................................
  1346.  
  1347.        down the screen. When the list reaches the bottom line the
  1348.        screen starts to scroll.  When all records have been listed the
  1349.        screen returns to the start of the list from where you can
  1350.        browse the report. If the list is long you can pause the output
  1351.        by pressing the return key while it is still running. Once the
  1352.        report is complete you can browse through it using the PgUp,
  1353.        PgDn and arrow keys.  You can also use the text search facility
  1354.        at F3.
  1355.  
  1356.        When you have finished reading the report press Escape to
  1357.        return to the procedures menu.  You can browse the report again
  1358.        at any time by selecting item 10 (Recall Last Output). Try it
  1359.        now.  While browsing a report you can also print it out by
  1360.        pressing F10.  If you press F10 to print a report from browse
  1361.        mode you invoke a low level print driver which prints the
  1362.        report at 10 CPI, 6 LPI in draft mode. Other font sizes and
  1363.        effects such as Bold and Underline are only available when you
  1364.        direct the report output to the printer at run time.
  1365.  
  1366.        To try printer effects select "Edit Procedure Code" and change
  1367.        The code to:-
  1368.  
  1369.        Declare output fields
  1370.           Aircraft.knownas : Aircraft.mark : Aircraft.type
  1371.        end
  1372.        Bold on
  1373.        12 CPI
  1374.        for aircraft
  1375.           print list items
  1376.        next
  1377.  
  1378.        Save the new code and select "Edit Output Format". There is
  1379.        nothing to change in the format itself but when you press F2 to
  1380.        save it, this time choose "Choose at Run time" for the output
  1381.        destination.
  1382.  
  1383.        When you now select "Run Procedure", the computer will beep and
  1384.        you will be asked whether the output is to be to the screen or
  1385.        printer. Choose printer and easy base will print your report in
  1386.        bold at 12 characters to the inch. (Assuming you have installed
  1387.        the correct printer driver from the utilities menu)
  1388.  
  1389.        You will notice that while Easy Base was printing your report
  1390.        it also output it to the screen but on completion it returned
  1391.        you to the procedures menu without invoking Browse mode.
  1392.  
  1393.        The output destinations which you choose when saving the output
  1394.        format are not "Either or" choices.  Irrelevant of your choice
  1395.        the output is always sent to both the screen and the disk file.
  1396.        It is the disk file that you browse when you select "Recall
  1397.        Last Output".  The differences between the choices are that
  1398.        only an output to the screen invokes Browse mode on completion
  1399.  
  1400.                                    - 24 -
  1401. ................................................................................
  1402.  
  1403.        and only an output to printer prints the report. Output to disk
  1404.        is only selected if you want to update reports from a Batch
  1405.        Execute menu.
  1406.  
  1407.        Now let's try something a bit more interesting. So far the
  1408.        report simply lists the aircraft in the order in which the
  1409.        records were filed.  To list them in alphabetic order, edit the
  1410.        procedure code and change the "For" line to:-
  1411.  
  1412.        for aircraft with knownas in order
  1413.  
  1414.        Save the code.  Easy Base can only list in order if the field
  1415.        you wish the order to be done by is indexed.  If the field you
  1416.        have chosen is not indexed you will get an error message.  If
  1417.        this happens, save the code by pressing the Escape Key - Save
  1418.        the procedure at item 7 then return to form design.  Load your
  1419.        form - edit the attributes for the field changing Indexed to
  1420.        "Yes".
  1421.  
  1422.        You can now reload your procedure and run it. This time the
  1423.        aircraft names will be in alphabetic order.
  1424.  
  1425.        Because a procedure has up to three parts it may not at this
  1426.        stage be obvious how Easy Base is handling the "Saving" or
  1427.        "Abandoning" of separate parts.  Here is a quick explanation.
  1428.        If you escape from either the output format or later the input
  1429.        screen and choose to "abandon" it you are abandoning it in the
  1430.        version of the report you are editing only. If you escape from
  1431.        the procedures menu and choose to "abandon" the procedure then,
  1432.        if it is a new "Untitled" procedure it is lost but if it is a
  1433.        procedure which you have loaded for editing then it is only the
  1434.        edits which are abandoned - The original procedure remains
  1435.        unchanged on disk. A procedure which you have loaded for
  1436.        editing is only changed on disk when you save it with item
  1437.        seven from the procedures menu.  At any time during the editing
  1438.        of a procedure you can throw away all your edits and return to
  1439.        the original version by reloading it from disk and replying
  1440.        "No" when you are asked if you wish to save the currently
  1441.        loaded version.
  1442.  
  1443.        Suppose now that we wished to list the aircraft in groups by
  1444.        type - all the bombers together - all the fighters together
  1445.        Etc.
  1446.  
  1447.        To do this, edit the procedure code again and change the "For"
  1448.        line to: -
  1449.  
  1450.        for aircraft with type in order
  1451.  
  1452.        This time, when the report is run, all the airliners come first
  1453.        followed by the bombers etc. but the group field "Airliner" ,
  1454.        "Bomber" etc. is listed on each line and it would be much
  1455.  
  1456.                                    - 25 -
  1457. ................................................................................
  1458.  
  1459.        neater if it could be separated or printed in Bold or
  1460.        underline.
  1461.  
  1462.        Edit the code again, this time to:-
  1463.  
  1464.        Declare output fields
  1465.           Aircraft.knownas : Aircraft.mark : Aircraft.type
  1466.        end
  1467.        declare variables
  1468.          lasttype as text
  1469.        end
  1470.        for Aircraft with type in order
  1471.           if aircraft.type <> lasttype then print group header
  1472.           lasttype = aircraft.type
  1473.           print list items
  1474.        next
  1475.  
  1476.        In this code we have introduced a text variable "lasttype".
  1477.        During the "For" loop the list items will be printed on each
  1478.        iteration but the group header will only be printed when the
  1479.        type changes
  1480.  
  1481.        Now edit the output format to:-
  1482.  
  1483.        .group header
  1484.  
  1485.            ████████████████
  1486.        .list items
  1487.                    ███████████████     ██████████████
  1488.        .end
  1489.  
  1490.        The group header starts with a blank line which will separate
  1491.        the groups. It contains only the "Type" field.  The list items
  1492.        section contains the "Knownas" and mark fields.
  1493.  
  1494.        When you run this report the output will be:-
  1495.  
  1496.           Airliners
  1497.                   Boeing 707
  1498.                   Dehaviland Comet     Mk4
  1499.                   Boeing Jumbo Jet     747
  1500.  
  1501.           Bombers
  1502.                   Boeing B52
  1503.                   Avro Vulcan
  1504.                   Avro lancaster       2
  1505.  
  1506.  
  1507.        If you want the group header to be in bold or underline then
  1508.        all you have to do is insert the on and off commands before and
  1509.        after the "Print group header" command using the block If then
  1510.        construction.
  1511.  
  1512.                                    - 26 -
  1513. ................................................................................
  1514.  
  1515.        Declare output fields
  1516.           Aircraft.knownas : Aircraft.type : Aircraft.mark
  1517.        end
  1518.        declare variables
  1519.           lasttype as text
  1520.        end
  1521.        for Aircraft with type in order
  1522.           if aircraft.type <> lasttype then
  1523.              bold on : underline on
  1524.              print group header
  1525.              bold off : underline off
  1526.           end if
  1527.           print list items
  1528.        next
  1529.  
  1530.        As a beginner, you are probably wondering about the reason for
  1531.        the indentations after the "for" and "if" lines. The code will
  1532.        work perfectly well without them. When you come to write more
  1533.        advanced procedures you will have many For loops, Do Loops and
  1534.        If conditions interwoven with each other.  If each has its own
  1535.        indentation then you will be able to see at a glance which
  1536.        commands occur within which loops and conditions and your code
  1537.        will be very easy to read and edit.
  1538.  
  1539.        Going back to the "Aircraft" listing procedure, we now have
  1540.        each group separated but the aircraft names themselves are no
  1541.        longer in alphabetic order.  This is because we changed index
  1542.        files when we selected "With Type in order".  It is now the
  1543.        "Type" groupings which are in alphabetic order.  Suppose that
  1544.        we want to keep this grouping but still list the aircraft in
  1545.        each group with their names in order.  Neither of the index
  1546.        files on the "Knownas" or "Type" fields can produce this order.
  1547.        We need a combined or "Compound" index on both fields
  1548.  
  1549.        To construct this index, save the present procedure and return
  1550.        to form design.  Load the "Aircraft" form and add a new field
  1551.        anywhere on it. Assuming the length of the "Knownas" field as
  1552.        20 and the length of the "Type" field as 15 the new fields
  1553.        attributes are:-
  1554.  
  1555.        Name         Typename
  1556.        Type         Text
  1557.        Length       35
  1558.        Mandatory    No
  1559.        Unique       No
  1560.        Indexed      Yes
  1561.        User Entry   No
  1562.        Display      Invisible
  1563.        Derived      Yes
  1564.  
  1565.        The derivation formula is:-
  1566.        Jointext(spacepad(category,15),knownas)
  1567.  
  1568.                                    - 27 -
  1569. ................................................................................
  1570.  
  1571.        Test that the derivation formula is correct by pressing F5 for
  1572.        test mode. When you type a name into the "Knownas" field and a
  1573.        type in the "Type" field the new field should derive as a
  1574.        combination of the two.
  1575.  
  1576.        Escape from test mode and press F2 to save the form. Easy Base
  1577.        will first re-format the data file to incorporate the new field
  1578.        and then write the new index file.
  1579.  
  1580.        When this is complete, return to the procedure and edit the
  1581.        "For line of the code from:-
  1582.  
  1583.        For aircraft with type in order
  1584.  
  1585.        to
  1586.  
  1587.        For Aircraft with typename in order
  1588.  
  1589.        No change is necessary to the output format.  The output will
  1590.        be laid out as before but the names in each group will be in
  1591.        alphabetic order.
  1592.  
  1593.        To "Polish" the "Aircraft" report it would be nice if it had a
  1594.        heading. We would also like to prevent the list from running
  1595.        off the end of the page when printed and add a page number at
  1596.        the foot of each page.
  1597.  
  1598.        To do these things edit the code to:-
  1599.  
  1600.        Declare output fields
  1601.           Aircraft.knownas : Aircraft.type : Aircraft.mark
  1602.           page number                  'New Field
  1603.        end
  1604.        Declare variables
  1605.           lasttype as text
  1606.        end
  1607.        bold on
  1608.        print report header
  1609.        for aircraft with typename in order
  1610.           if bottom margin < 1 then
  1611.              bold on : print page footer
  1612.              page feed : print page header : bold off
  1613.           end if
  1614.           if aircraft.type <> lasttype then
  1615.              bold on : underline on
  1616.              print group header
  1617.              bold off : underline off
  1618.           end if
  1619.           print list items
  1620.        next
  1621.        print report footer
  1622.  
  1623.  
  1624.                                    - 28 -
  1625. ................................................................................
  1626.  
  1627.        Now edit the output format to:-
  1628.  
  1629.        .Report header
  1630.            ════════════════════════════════════════════════════
  1631.                        AIRCRAFT LIST BY TYPE
  1632.            ────────────────────────────────────────────────────
  1633.        .Group Header
  1634.  
  1635.            ████████████████
  1636.        .List Items
  1637.                    ████████████████     ██████████████████
  1638.        .Page header
  1639.            ════════════════════════════════════════════════════
  1640.                     Aircraft List By Type (Cont)
  1641.            ────────────────────────────────────────────────────
  1642.        .Page Footer
  1643.  
  1644.                                - ██ -
  1645.        .Report Footer
  1646.            ════════════════════════════════════════════════════
  1647.        .End
  1648.  
  1649.        The new print sections Report Header, Report Footer, and Page
  1650.        Header contain only fixed text.  The new section Page Footer
  1651.        contains the new field "page number" and the "Trim trailing
  1652.        spaces" attribute should be set to "Yes" in this.  This will
  1653.        keep the correct spacing of   - 9 -    and   - 10 -    when the
  1654.        page numbers are printed.
  1655.  
  1656.  
  1657.        So far all the fields we have printed are from the same form
  1658.        "Aircraft".  Suppose that we also wanted to list the country of
  1659.        origin for each aircraft.  The "Aircraft" form does not hold
  1660.        this information but the "Manufacturers" form has a field
  1661.        "Nationality". To incorporate this field into the report all we
  1662.        have to do is declare it as an output field and then arrange to
  1663.        have that field in memory when we print the list items. We can
  1664.        load the correct record from the "Manufacturers" form by using
  1665.        the linking data "Name" in the manufacturers form and
  1666.        "Manufacturer" in the "Aircraft" form.  This is a similar
  1667.        process to looking up data except that a pre defined
  1668.        relationship is not necessary. We can tell Easy Base exactly
  1669.        what we want within the code.
  1670.  
  1671.        Declare output fields
  1672.           Aircraft.knownas : Aircraft.type : Aircraft.mark
  1673.           Manufacturers.nationality : Page number
  1674.        end
  1675.        Declare variables
  1676.           Lasttype as text
  1677.        end
  1678.  
  1679.  
  1680.                                    - 29 -
  1681. ................................................................................
  1682.  
  1683.        '.....................PRINT REPORT HEADING...
  1684.        print report header
  1685.        '.................
  1686.        for aircraft with typename in order
  1687.           '..................PRINT HEADERS AND FOOTERS...
  1688.           if bottom Margin < 1 then
  1689.              bold on : print page footer
  1690.              page feed : print page header : bold off
  1691.           end if
  1692.           '..................PRINT GROUP HEADERS.........
  1693.           if aircraft.type <> lasttype then
  1694.              bold on : underline on
  1695.              print group header
  1696.              bold off : underline off
  1697.           end if
  1698.           '...............LOAD MANUFACTURERS NATIONALITY..
  1699.           for manufacturers with name = aircraft.manufacturer
  1700.              Print list items
  1701.           next
  1702.           '..............
  1703.        next
  1704.        print report footer
  1705.  
  1706.        Because the procedure code is becoming longer, remarks are
  1707.        added to make it easier to see which parts of the code do what.
  1708.        You can add remarks to your code anywhere by prefixing them
  1709.        with an apostrophe.
  1710.  
  1711.        At the point where we are about to print the list items we
  1712.        start another "For" loop.  This time "For Manufacturers".  When
  1713.        one "For" loop is "Nested" within another, the record currently
  1714.        loaded by the first loop remains in memory while the records
  1715.        selected by the "Nested" loop are processed and all the fields
  1716.        of both records are available at the same time.
  1717.  
  1718.        As we have qualified the "Manufacturers" loop:-
  1719.  
  1720.        for manufacturers with name = aircraft.manufacturer
  1721.  
  1722.        only the single record in which the "Name" field matches the
  1723.        "Aircraft.manufacturer" field which is currently loaded by the
  1724.        outer loop will be selected from the "Manufacturers" form.
  1725.  
  1726.        While we have both the required records in memory we print the
  1727.        list items.
  1728.  
  1729.        All that remains to do now is to edit the output format and add
  1730.        the "Manufacturers.nationality" field to the .List Items
  1731.        section.
  1732.  
  1733.  
  1734.  
  1735.  
  1736.                                    - 30 -
  1737. ................................................................................
  1738.  
  1739.        By nesting loops in this way, you can list data from any number
  1740.        of different forms which have "Linking" data in one of their
  1741.        fields.  Where only one record matches as in the example above
  1742.        then the required fields go in the .List items section with the
  1743.        other fields.  Where there are many matches (Related list) the
  1744.        fields from the secondary loop have their own print section.
  1745.        (See example on page 5)
  1746.  
  1747.        Now we can print any of the fields from any "Related" forms in
  1748.        any order.  We are still, however, listing all the records from
  1749.        the "Aircraft" form and we may for example only wish to print
  1750.        those records which are in the "Bomber" group.
  1751.  
  1752.        Start a new procedure and enter the code:-
  1753.  
  1754.        Declare output fields
  1755.           Aircraft.knownas : Aircraft.type : Aircraft.base
  1756.        end
  1757.        for aircraft with type = "Bomber"
  1758.           print list items
  1759.        next
  1760.  
  1761.        Create the output format placing the three output fields within
  1762.        the .List Items section.
  1763.  
  1764.        When you run this report, only the bombers will be listed but,
  1765.        once more, the aircraft names will be in the order in which
  1766.        they were entered to the form.
  1767.  
  1768.        To get them in alphabetic order we must again use the compound
  1769.        index on the "Typename" field. This time we have to ensure that
  1770.        the loop starts with the first "Bomber" and ends with the last
  1771.        "Bomber".
  1772.  
  1773.        Declare output fields
  1774.           Aircraft.knownas : Aircraft.type : Aircraft.base
  1775.        end
  1776.        declare variables
  1777.           group as text
  1778.        end
  1779.        group = "Bomber"
  1780.        for aircraft with typename > "Bomber"
  1781.           if aircraft.type <> group then exit for
  1782.           print list items
  1783.        next
  1784.  
  1785.        Before starting the "For" loop we set a variable "Group" to the
  1786.        value "Bomber". The "For" loop is then qualified such that the
  1787.        records will be processed with "Typename" in order but starting
  1788.        with the first occurrence of "Bomber" in the field.  To stop
  1789.        the loop when all the bombers have been processed we test the
  1790.        contents of the "Aircraft.type" field on each iteration of the
  1791.  
  1792.                                    - 31 -
  1793. ................................................................................
  1794.  
  1795.        loop and when the first record is loaded which is not a bomber
  1796.        we stop processing the loop with the command "Exit For".
  1797.  
  1798.        As in the first procedure, we could now add Page headers, Page
  1799.        footers and number the pages Etc.
  1800.  
  1801.        Suppose however that having created this procedure we now
  1802.        wanted a list of all the "Airliners".
  1803.  
  1804.        We could achieve this by changing "Bomber" to "Airliner" within
  1805.        the code but this would be time consuming. It would be much
  1806.        better if we could tell Easy Base which type group we wanted at
  1807.        the start of the procedure and have Easy Base make the
  1808.        necessary changes.
  1809.  
  1810.        To supply "Variables" to a procedure before running we use an
  1811.        "Input Screen", the third part of a procedure.  Save the code
  1812.        and select item 3 (Create Input Screen) from the procedures
  1813.        menu.
  1814.  
  1815.        As soon as you select item 3 Easy Base will ask if you wish to
  1816.        copy an existing form. Type "N" for no.  The next screen will
  1817.        be familiar to you.  It is exactly the same as the form design
  1818.        screen.
  1819.  
  1820.        When you first designed your forms, the form design routine
  1821.        performed two tasks. It created your form and also a default
  1822.        input screen from which to enter data. Now that you are about
  1823.        to create input screens for procedures, the same routine is
  1824.        used to design the screen.  It does not, of course, create a
  1825.        parallel form.
  1826.  
  1827.        All the facilities for "Polishing" your forms - all the
  1828.        facilities for deriving, calculating looking up and testing
  1829.        derivations which you had in Form Design are also available for
  1830.        Input Screen design.
  1831.  
  1832.        The only difference you will notice is that when you define a
  1833.        field, the "Unique" and "Indexed" attributes are marked "Not
  1834.        Applicable" and when you run the procedure, only the "Options"
  1835.        "Clear Screen after Running Procedure" and "Clear Field on
  1836.        Editing" are available.
  1837.  
  1838.        Move the cursor to somewhere near the middle of the screen and
  1839.        type:- "Which Aircraft type would you like listed".  Then press
  1840.        F10 to define a field.
  1841.  
  1842.        If, in the aircraft form the "Type" field had been defined as a
  1843.        choice field, then we would define this field as a choice field
  1844.        and use the same list.
  1845.  
  1846.        If, on the other hand the "Type" field in the "Aircraft" form
  1847.  
  1848.                                    - 32 -
  1849. ................................................................................
  1850.  
  1851.        looked up its contents from a core data form containing the
  1852.        type names then we would set the attributes:-
  1853.  
  1854.        Name            type
  1855.        Data type       text
  1856.        Field Length    15    (Same as the "Type" field in "Aircraft")
  1857.        Mandatory       Yes
  1858.        User Entry      Yes
  1859.        Display         Field  (or text or Alt colours as you wish)
  1860.        Derived         No
  1861.  
  1862.        The field will of course be derived:- Lookup(Aircraft,type)
  1863.        but as we have not yet entered the relationship, we will leave
  1864.        the derived attribute set to "No" to prevent an error message
  1865.        when we save the screen.
  1866.  
  1867.        Save the screen.  When you do, you will be asked to select
  1868.        between "Repeat Screen after F2" and "Run Once and Exit".
  1869.  
  1870.        If you choose the first option then the procedure will repeat
  1871.        until you press the Escape Key. If you choose the second
  1872.        option, control will return to the procedures menu after the
  1873.        report has been run.
  1874.  
  1875.        Now save the procedure.  Let's call it "Aircraft By Type".
  1876.  
  1877.        You may have noticed that all Form, Field and Procedure names
  1878.        so far have been single words.  There is no restriction on
  1879.        using multiple words in names but single ones make code much
  1880.        easier to read. The only good reason to use more than one word
  1881.        is in a reporting procedure name. After the procedure has been
  1882.        run the status line in Browse mode will be "Procedure:-
  1883.        Aircraft By Type" which makes more sense to an end user than
  1884.        "Procedure:- ACbytyp".
  1885.  
  1886.        Now go to Relationships and enter the relationship "Aircraft"
  1887.        between "Aircraft by Type" and "Aircraft" linking the two
  1888.        fields "Type".
  1889.  
  1890.        Reload the "Aircraft by Type" procedure and edit the Input
  1891.        screen setting the derived attribute to "yes" and entering the
  1892.        derivation formula:-  Lookup(aircraft,type)
  1893.  
  1894.        Save the screen again and select "Edit Procedure Code".
  1895.  
  1896.        To use the Input screen quickly you could change the two
  1897.        occurrences of "Bomber" to input.type. However, now that we
  1898.        have an input.type field the variable "group" is superfluous.
  1899.  
  1900.        The finished procedure code and Output format are shown on the
  1901.        next page.
  1902.  
  1903.  
  1904.                                    - 33 -
  1905. ................................................................................
  1906.  
  1907.        Declare output fields
  1908.           Aircraft.knownas : Aircraft.base
  1909.           Page number : input.type
  1910.        end
  1911.        Print report header
  1912.        for aircraft with typename > input.type
  1913.           if bottom margin < 1 then
  1914.              print report footer
  1915.              page feed : print page header
  1916.           end if
  1917.           if aircraft.type <> input.type then exit for
  1918.           print list items
  1919.        next
  1920.        print report footer
  1921.        page feed
  1922.  
  1923.  
  1924.        ......................Output Format.........
  1925.  
  1926.        .Report Header
  1927.               ══════════════════════════════════════════════
  1928.                             ████████████ LIST
  1929.                             ════════════
  1930.                   Name                   Built at
  1931.               ──────────────────────────────────────────────
  1932.        .Page header
  1933.               ──────────────────────────────────────────────
  1934.                   Name                   Built at
  1935.               ──────────────────────────────────────────────
  1936.        .List items
  1937.                   ████████████████████   █████████████████
  1938.        .Page Footer
  1939.  
  1940.                                - ██ -
  1941.        .Report Footer
  1942.               ══════════════════════════════════════════════
  1943.        .End
  1944.  
  1945.  
  1946.        The field in the Report header is input.type.  The fields in
  1947.        the list items are Aircraft.knownas and Aircraft.base.
  1948.        The field in the page footer is Page number.
  1949.  
  1950.        Suppose now that we print out the report and find that we had
  1951.        entered all the "Aircraft" "Knownas" fields in Upper case and
  1952.        all the "Base" fields in Lower case.  This would make the
  1953.        report quite untidy.  There is no need however to change the
  1954.        original data. To print both fields in Upper case all we need
  1955.        to do is alter each of the "Base" field contents using the
  1956.        "Upper" Function before printing it.
  1957.  
  1958.        To do this insert the line:-
  1959.  
  1960.                                    - 34 -
  1961. ................................................................................
  1962.  
  1963.           aircraft.base = upper(aircraft.base)
  1964.  
  1965.        immediately before the print list items command.
  1966.  
  1967.        As well as simply "Listing" data you can manipulate it in many
  1968.        different ways.  You can do any form of arithmetic on numeric
  1969.        fields and you can alter text, date and time fields with over
  1970.        fifty different functions.
  1971.  
  1972.        A function is a small internal routine which returns a value
  1973.        derived from one or more other values (Parameters) which you
  1974.        supply.  For Example, in the code line:-
  1975.  
  1976.        date = datetext(invoice.date)
  1977.  
  1978.        "Datetext" is a function to which you are passing the parameter
  1979.        "Invoice.date".  If invoice.date is 02/02/94 then the function
  1980.        "Datetext" will derive the text "2nd February 1994" and
  1981.        "Return" this as if it were a variable. The output field "Date"
  1982.        will therefore become "2nd February 1994".
  1983.  
  1984.        A functions parameters are always passed to it enclosed in
  1985.        brackets.  If there are more than one then they are separated
  1986.        by commas.
  1987.  
  1988.        The next section of the Manual introduces you to Procedures
  1989.        which perform transactions.  You should now read the
  1990.        descriptions of the following commands in the Programmers
  1991.        Reference.
  1992.  
  1993.        Copy All From
  1994.        Delete Record
  1995.        Clear Records From
  1996.        Update Record
  1997.        Pause On/Off
  1998.        Escape On/Off
  1999.  
  2000.        Together with the field control "Beep".
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.                                    - 35 -
  2017. ................................................................................
  2018.  
  2019.                        PROCEDURES (TRANSACTIONAL)
  2020.  
  2021.        In Data Entry you make a "Transaction" when you add, update or
  2022.        delete a record.  You can make the same transactions in
  2023.        procedures.  There are, however, two major advantages to
  2024.        making your transactions via procedures.
  2025.  
  2026.        1.   You control which transactions can and cannot be made.
  2027.  
  2028.        2.   You can make any number of different transactions in any
  2029.             number of different forms.
  2030.  
  2031.        Consider the "Customers" form.  You would want any of your
  2032.        staff to be able to add a new customer in your absence. If you
  2033.        allow them to do this in Record Entry then they could also
  2034.        (deliberately or inadvertently) alter or delete other customers
  2035.        records.
  2036.  
  2037.        To prevent this, create a new procedure.  Create an input
  2038.        screen.  When you are asked if you wish to copy an existing
  2039.        form - reply "Yes" and select the customers form.  Save the
  2040.        input screen and select Create Procedure Code. Now enter the
  2041.        procedure code:-
  2042.  
  2043.        for customers new record
  2044.           copy all from input
  2045.        next
  2046.  
  2047.        Save the procedure - Let's call it "Enter customers".  You can
  2048.        now call this procedure from your "User Menus" described in the
  2049.        next section and your staff will be able to enter new customers
  2050.        without the opportunity to make any other transactions.
  2051.  
  2052.        You can also control parts of a transaction.  If your
  2053.        "Customers" form had a field for "Creditlimit" then, in the
  2054.        form, you would wish to be able to enter any credit limit you
  2055.        wanted, but you might wish to restrict the amount your staff
  2056.        could enter for a new customer.
  2057.  
  2058.        To do this you simply edit the field attributes for the
  2059.        "Creditlimit" field in the input screen.
  2060.  
  2061.        To set a fixed credit limit of say £500.00 set the user entry
  2062.        attribute to "No", the derived attribute to "Yes" and enter the
  2063.        derivation formula:- 500.
  2064.  
  2065.        To restrict the entry to a maximum of say £1000.00 you would
  2066.        leave the user entry attribute set to "yes" but derive the
  2067.        field:-  If(creditlimit > 1000,blank[beepMaximum credit £1000
  2068.                 for new customers],creditlimit)
  2069.  
  2070.        There might also be fields on the "Customers" form which are
  2071.  
  2072.                                    - 36 -
  2073. ................................................................................
  2074.  
  2075.        irrelevant to the transaction of adding a new customer.  You
  2076.        might also have fields for personal comments which you do not
  2077.        wish your staff to see.  You can simply delete these from the
  2078.        input screen or change them to invisible.
  2079.  
  2080.        In other words you can limit a transaction in any way you wish
  2081.        and the final input screen can be totally different to the
  2082.        original form.
  2083.  
  2084.        Transaction procedures which delete or update records are
  2085.        created in a similar manner but are slightly more complicated.
  2086.  
  2087.        To create a procedure which allows your staff to delete
  2088.        customers, you would again copy the customers form as the input
  2089.        screen.  This time, the only field to which you allow User
  2090.        Entry is the "acountno" field.  You enter a relationship
  2091.        between this report and the "Customers" form linking "acountno"
  2092.        and derive all the other fields you wish to show as:-
  2093.  
  2094.        lookup(customers,name)
  2095.        lookup(customers,address)
  2096.        Etc.
  2097.  
  2098.        Your staff now enter the account number to be deleted. The
  2099.        other "looked up" fields are only there so that the name and
  2100.        address will appear confirming that the correct account number
  2101.        has been entered.
  2102.  
  2103.        The procedures code to delete the record is:-
  2104.  
  2105.        for customers with acountno = input.acountno
  2106.           delete record
  2107.        next
  2108.  
  2109.        As with the procedure to add a record you are still in complete
  2110.        control of what can or cannot be done.  Suppose that you had a
  2111.        field on the "customers" form which you kept updated with his
  2112.        account balance.  You would not want anyone to delete a
  2113.        customer who still had an outstanding balance on his account.
  2114.  
  2115.        To prevent this, just change the derivation for the "balance"
  2116.        field to :-
  2117.  
  2118.        if(lookup(customers,balance) <> 0,blank[beepCustomers cannot be
  2119.        deleted until their A/C is clear],0)
  2120.  
  2121.        You would also set the Mandatory attribute to "Yes" to prevent
  2122.        anyone from ignoring the warning.
  2123.  
  2124.        If you wanted a procedure which allowed staff to change a
  2125.        customers address but no other fields, then you would create
  2126.        the same input screen as for the delete record and the same
  2127.  
  2128.                                    - 37 -
  2129. ................................................................................
  2130.  
  2131.        relationship but this time you would allow user entry to the
  2132.        address field and derive it:-
  2133.  
  2134.        Default(lookup(customers,address))
  2135.  
  2136.        When the operator enters the account number for the customer
  2137.        whose address he wishes to change, the old address will appear
  2138.        to confirm that he has the right customer, but he will be able
  2139.        to edit it.
  2140.  
  2141.        The procedure code would be:-
  2142.  
  2143.        for customers with acountno = input.accountno
  2144.           customers.address = input.address
  2145.           update record
  2146.        next
  2147.  
  2148.        The second advantage of making transactions via procedures is
  2149.        that you can perform several tasks at once. Consider a Video
  2150.        Library hiring films to its members. There will be a form for
  2151.        the films, one for the members and one for daily takings.
  2152.  
  2153.        The procedure used for hiring out the films will have an input
  2154.        screen with a field for the members number, possibly three
  2155.        fields for the film numbers being hired, three more fields in
  2156.        which the films rental prices are looked up and one in which
  2157.        these three fields are totalled.  When the operator runs the
  2158.        procedure all the necessary transactions are performed by the
  2159.        procedure code:-
  2160.  
  2161.        for members with number = input.member
  2162.           if input.film1 <> blank then members.film1 = input.film1
  2163.           if input.film2 <> blank then members.film2 = input.film2
  2164.           if input.film3 <> blank then members.film3 = input.film3
  2165.           update record
  2166.        next
  2167.        if input.film1 <> blank then
  2168.           for films with number = input.film1
  2169.              films.hiredto = input.member
  2170.              films.datehired = system date
  2171.              update record
  2172.           next
  2173.        end if
  2174.        for daily takings
  2175.           total = total + input.total
  2176.           update record
  2177.        next
  2178.  
  2179.        The mid section of the code updating film1's record would of
  2180.        course be repeated for film2 and film3 but has been omitted for
  2181.        clarity.
  2182.  
  2183.  
  2184.                                    - 38 -
  2185. ................................................................................
  2186.  
  2187.                               USER MENUS
  2188.  
  2189.        Once you have created forms and procedures you can create an
  2190.        end user menu system to run them.  You could wait till all your
  2191.        procedures are finished but you will get a much better feel for
  2192.        how your program is developing if you start and use a menu
  2193.        system as you go.  Easy Base includes a User Menu call to its
  2194.        system menus so you can work from your own developing menu
  2195.        system while you are still developing your program.
  2196.  
  2197.        Select "Menus" from the main menu and have a look at the
  2198.        screen.  The Menus screen is an internal form just like the
  2199.        ones you have created. You have all the same facilities to
  2200.        enter, update and delete menus that you have in Data Entry to
  2201.        one of your own forms.
  2202.  
  2203.        Let's create a menu based on some of the forms and procedures
  2204.        previously discussed.
  2205.  
  2206.        The first field on the menus form is "Menu Name".  This is the
  2207.        unique field and a name must be supplied.  We'll call it
  2208.        "Customers".  The next field is "Menu Type". This is a choice
  2209.        field with two options, "Normal" and "Batch Execute".  The
  2210.        "Batch Execute" option will be discussed later.  For now,
  2211.        select "Normal".
  2212.  
  2213.        The third field is "Menu Title". Whatever you enter here will
  2214.        be displayed as a title (or heading) above your menu.
  2215.  
  2216.        The fourth field which is untitled on the screen is a choice
  2217.        field with the options, "Run on Number Key" and "Run on Return
  2218.        Key".  If you choose the first option then the items on your
  2219.        menu will be run as soon as the item number is pressed and if
  2220.        you choose the second option then typing the item number will
  2221.        move the highlight bar to the selection but the item will not
  2222.        be called until the return key is pressed.  In either case you
  2223.        will still be able to select items with the cursor control keys
  2224.  
  2225.        The next field asks for a "Sign on password" if a startup menu.
  2226.        You can start your application (program) on any menu that has
  2227.        a sign on password by restarting Easy Base and using that
  2228.        password instead of your developers password.  In this case we
  2229.        are going to menu the reports which add, delete and alter a
  2230.        customers address. This will be a sub menu so we leave this
  2231.        field blank.
  2232.  
  2233.        The main section of the "Menus" form has three columns of nine
  2234.        fields.  The first column is for the text to be displayed on
  2235.        the menu.  The second is for the type of action (function)
  2236.        which is to be called.  The third is for the individual item.
  2237.  
  2238.  
  2239.  
  2240.                                    - 39 -
  2241. ................................................................................
  2242.  
  2243.        With the cursor in the first text field we type:-
  2244.  
  2245.        Enter a New Customer      and press return.
  2246.  
  2247.        As soon as the cursor moves to the first "Function" field a
  2248.        menu appears listing all the different functions that can be
  2249.        called.  The first four choices allow you to:-
  2250.  
  2251.        1.   Run one of your procedures.
  2252.        2.   Recall the last output from one of your procedures.
  2253.        3.   Call the data entry screen for one of your forms.
  2254.        4.   Call another of your menus.
  2255.  
  2256.        The other functions are selected utilities from the system
  2257.        utilities menu which you may wish to provide to the
  2258.        end user without allowing him access to the entire system.
  2259.  
  2260.        Select "Run Procedure" and press return.
  2261.  
  2262.        When the cursor moves to the "Item" column Easy Base will list
  2263.        all your procedures. Choose "Enter customers".
  2264.  
  2265.        on the next two lines enter:-
  2266.  
  2267.        Delete Existing Customer   Run Procedure    Delete Customers
  2268.        Change Customers Address   Run Procedure    Address Change
  2269.  
  2270.        and press F2 to save the menu.
  2271.  
  2272.        Now let's make a start to the main "Startup" menu.  We may not
  2273.        have any procedures to put on it yet but we can get started
  2274.        with an item to call data entry to "Customers" and one to call
  2275.        the "Customers" sub menu.
  2276.  
  2277.        Fill in a new menus record using the name "Main Menu", Type
  2278.        "Normal" and Title "- M A I N   M E N U -".  This time enter a
  2279.        startup password, say "Fred".  Complete the Items section
  2280.        with:-
  2281.  
  2282.        Customers Records          Data Entry       Customers
  2283.        Customer Updates           User Menu        Customers
  2284.        Program Development        System menus
  2285.  
  2286.        Press F2 to save this menu then press escape all the way out to
  2287.        the DOS prompt (or your hard disk menu system).  Restart Easy
  2288.        Base.  This time, when the sign on screen appears, enter "Fred"
  2289.        and press return.
  2290.  
  2291.        Instead of the system menus, you will see your "Main Menu".
  2292.        If you select item 1 the "Customers" form will come up. If you
  2293.        select item 2 your sub menu will be overlaid and you can run
  2294.        any of the three procedures on it.  If you select item 3 you
  2295.  
  2296.                                    - 40 -
  2297. ................................................................................
  2298.  
  2299.        will be transferred to the Easy Base System menus where you can
  2300.        continue with the development of your program.
  2301.  
  2302.        Whenever you create new procedures or forms you can add them to
  2303.        your menu system.
  2304.  
  2305.        Suppose you would like the utilities, Backup Data, Restore Data
  2306.        and Install Printer to be available from your menu system.
  2307.        Create a new menu, let's call it "Utilities" with the items:-
  2308.  
  2309.        Backup data to disk        Backup Data
  2310.        Restore data from disk     Restore Data
  2311.        Install Printer            Install Printer
  2312.  
  2313.        Save this new menu then edit your main menu to include the new
  2314.        item:-
  2315.  
  2316.        Utilities                  User menu           Utilities
  2317.  
  2318.        When you have called the Easy Base system menus from one of
  2319.        your own menus then pressing escape does not exit the program,
  2320.        it returns you to your own menu.  You close down by pressing
  2321.        escape from your main menu.  When you get back to your "Main
  2322.        Menu" you will notice that the new "Utilities" item is not
  2323.        there. New Menu items cannot be added while the program is
  2324.        running. To incorporate the "Utilities" item you must again
  2325.        exit the program and restart with the password "Fred".
  2326.  
  2327.        As your program develops you can create as many menus as you
  2328.        need. Your "Main Menu" can call up to nine sub menus. Each of
  2329.        those can call another nine sub sub menus Etc Etc. You can also
  2330.        have additional startup menus with different passwords. These
  2331.        can either run completely different menus or can restrict
  2332.        different parts of the menu system to different users.
  2333.  
  2334.        When you start up on one of your menus systems Easy Base
  2335.        creates a default "Tree" structure for it.  From whichever menu
  2336.        is on screen the escape key backsteps down the tree until you
  2337.        reach your "Main Menu" and then exits the program.
  2338.  
  2339.        If one of the "forward" menu calls crosses branches, ie it
  2340.        calls a menu which is also called from a lower level then
  2341.        subsequent presses of the escape key backstep down the current
  2342.        branch and not back "cross tree".
  2343.  
  2344.        You can also make menu calls from low to high levels. (a sub-
  2345.        sub- sub menu can have an item which calls the main menu).
  2346.  
  2347.        In some circumstances you may prefer a hierarchical rather than
  2348.        a tree structure where the main menu is recalled after each
  2349.        individual procedure.  To accomplish this, each final item is
  2350.        placed on its own menu followed by a call to the main menu and
  2351.  
  2352.                                    - 41 -
  2353. ................................................................................
  2354.  
  2355.        the menu type is changed to "Batch Execute".
  2356.  
  2357.        When you create a "Batch Execute" menu then instead of
  2358.        displaying a menu for you to choose from, Easy Base
  2359.        executes each item on the menu in sequence and then returns to
  2360.        the menu which called it.
  2361.  
  2362.        With batch execute menus you can automate many of the processes
  2363.        in your application.  If you have several printouts to be done
  2364.        each day you can have them all done from batch execute menus.
  2365.        Similarly, if you need to update many reporting procedures for
  2366.        later "Recall" to the screen, these can all be done at once.
  2367.        There is no limit to the number of procedures which can be
  2368.        batched - One batch menu can call another.
  2369.  
  2370.        If you create a "Startup" batch menu then, provided it does not
  2371.        call a "Normal" menu, Easy Base will perform all the tasks on
  2372.        the menu and then exit to DOS.
  2373.  
  2374.        If you create a "Startup" batch menu which eventually calls a
  2375.        "Normal" menu then the batch process stops at that point and
  2376.        the "Normal" menu becomes the main (root) menu.  Pressing
  2377.        escape from this menu exits to DOS. it never returns to the
  2378.        startup batch menu which called it
  2379.  
  2380.        Start up batch menus are useful for running regular daily
  2381.        procedures and for forcing the user to check the system date
  2382.        and time.
  2383.  
  2384.        There are many other uses for batch execute menus.  You can
  2385.        automate menu changes. If, for example, running one particular
  2386.        procedure is invariably followed by  running one from a choice
  2387.        of three others then the menu containing the others can be
  2388.        batched after the first procedure.
  2389.  
  2390.        In Easy Base you can create quite long and complex procedures
  2391.        but they are eventually limited by memory constraints.  If you
  2392.        ever run out of memory creating a long procedure then just
  2393.        split it and batch the parts.
  2394.  
  2395.        Don't forget to set the output of non print reports to "Disk"
  2396.        otherwise Browse Mode will be invoked.
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.                                    - 42 -
  2409. ................................................................................
  2410.  
  2411.                            SYSTEM REQUIREMENTS
  2412.  
  2413.        Required.
  2414.  
  2415.            IBM or compatible 286 or higher
  2416.            1Meg Ram
  2417.            600k free conventional memory (for DOS5 and later this
  2418.                    requires the lines:-
  2419.                    device=c:\dos\himem.sys
  2420.                    DOS=high
  2421.                    in your config.sys file)
  2422.  
  2423.        Preferred.
  2424.  
  2425.           3 Meg expanded memory with 2 Meg allocated to PC-Cache
  2426.  
  2427.  
  2428.  
  2429.                            SYSTEM LIMITATIONS
  2430.  
  2431.        Fields per Form         500
  2432.        Indexes per Form        500
  2433.        Record Length           Limited by display of 4 screen pages
  2434.        Records per Form        Limited by Maximum data or index file
  2435.                                length of 2,100 Megabytes
  2436.  
  2437.        Forms per application       }     Total of 500 in
  2438.        Procedures per application  }     any combination.
  2439.        Menus per application             500
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.                                    - 43 -
  2465. ................................................................................
  2466.  
  2467.                          DOS FILENAME CONVENTIONS
  2468.  
  2469.        The Easy Base system files are:-
  2470.  
  2471.           EB.EXE     The program file
  2472.           EB.CUR     Initial screen setup
  2473.           EB.SET     Set up options retained between sessions
  2474.           EB.MEN     User Menus form
  2475.           EB.REL     Relationships form
  2476.           EB.MSG     Text and error messages
  2477.           EB.PRS     Printer drivers
  2478.           EB.D01     Main dictionary
  2479.           EB.DO2     Personal dictionary
  2480.  
  2481.        Easy Base does not access data files outside of its own
  2482.        directory. The concept being that the forms, procedures and
  2483.        menus which you create are combined with the system files to
  2484.        produce a new program or "Application".
  2485.  
  2486.        If you already have one application and you wish to start
  2487.        another, you copy the system files to a new directory for the
  2488.        new project. To extract the system files from your original
  2489.        project you can use the DOS copy command with wildcards.
  2490.  
  2491.        Copy C:\OLDDIR\EB*.* C:\NEWDIR
  2492.  
  2493.        The files which you create in writing an application have the
  2494.        following filename convention.
  2495.  
  2496.        Forms
  2497.  
  2498.           BASE(No).DEF      The entry screen definition
  2499.           BASE(No).DAT      The data file
  2500.           BASE(No).(No)     Index files
  2501.  
  2502.        Choice field lists
  2503.  
  2504.           LIST(No).DAT
  2505.  
  2506.        Procedures
  2507.  
  2508.           PROC(No).PRO      The procedure code
  2509.           PROC(No).DEF      The input screen
  2510.           PROC(No).REP      The output from the procedure
  2511.  
  2512.        There are also five individual files
  2513.  
  2514.        MENUS.DAT            The menus you create
  2515.        RELATION.DAT         The relationships you create
  2516.        CHOICES.DIR          The choice list directory
  2517.        BASE.DIR             The forms directory
  2518.        PROC.DIR             The procedures directory
  2519.  
  2520.                                    - 44 -
  2521. ................................................................................
  2522.